<template>
	<view>
		<!-- #ifdef APP-PLUS -->
		<view class="status_bar">  
		    <view class="top_view"></view>  
		</view>
		<block v-if="isUp">
			<yomol-upgrade :url="upgradeUrl" :content="upgradeContent" ref="yomolUpgrade"></yomol-upgrade>
		</block>
		<!-- #endif -->
		
		<!-- <view class="loading-wrap">
			<image :src="loginlogo" class="sign-logo" mode="aspectFit"></image>
			<view class="font-size36 margin-top-20 margin-bottom-30">引迈开发平台</view>
		</view> -->
		<!-- #ifdef APP-PLUS -->
		<!-- <view class="startup_box uni-area uni-flex-column">
			<view class="loading-wrap uni-area uni-flex">
				<image :src="startup.topLeft" class="sign-logo" mode="widthFix"></image>
				<image :src="startup.topRight" class="sign-logo" mode="widthFix"></image>
			</view>
			<view class="loading-main uni-area uni-flex">
				<image :src="startup.main" class="sign-logo" mode="widthFix" style=""></image>
			</view>
			
			<view class="bottomRight">
				<view class="center-box uni-area uni-flex">
					<image :src="loginlogo.logo" class="sign-logo" mode="widthFix" style=""></image>
				</view>
				<view class="bottomRight_img uni-flex">
					<image :src="startup.bottomRight" class="sign-logo" mode="widthFix"></image>
				</view>
			</view>
		</view> -->
		<!-- #endif -->
		<view class="startup_box uni-area uni-flex-column">
			<view class="loading-wrap uni-area uni-flex">
				<image :src="startup.topLeft" class="sign-logo" mode="widthFix"></image>
				<image :src="startup.topRight" class="sign-logo" mode="widthFix"></image>
			</view>
			<view class="loading-main uni-area uni-flex">
				<image :src="startup.main" class="sign-logo" mode="widthFix" style=""></image>
			</view>
			
			<view class="bottomRight">
				<view class="center-box uni-area uni-flex">
					<image :src="loginlogo.logo" class="sign-logo" mode="widthFix" style=""></image>
				</view>
				<view class="bottomRight_img uni-flex">
					<image :src="startup.bottomRight" class="sign-logo" mode="widthFix"></image>
				</view>
			</view>
		</view>
		
		
		
		<!-- <view class="loading-wrap">
			<image :src="loginlogo" class="sign-logo" mode="aspectFit"></image>
			<view class="font-size36 margin-top-20 margin-bottom-30">引迈开发平台</view>
		</view> -->
	</view>
</template>

<script>
	import config from '@/common/js/config.js'
	// #ifdef APP-PLUS
	import yomolUpgrade from '@/components/upgrade/yomol-upgrade.vue'
	// #endif
	import helper from '@/common/js/helper.js'
	export default {
		components: {
			// #ifdef APP-PLUS
			yomolUpgrade
			// #endif
		},
		data() {
			return {
				upgradeType: 'pkg', //pkg 整包 wgt 升级包
				upgradeContent: [], //更新内容
				upgradeUrl: config.Resources.jnapp, //更新地址
				isUp: false,
				startup:config.Resources.startup,
				loginlogo:config.Resources.login
			}
		},
		onLoad(e) {
			//清理缓存
			// this.removeStorage()
			
			const value = uni.getStorageSync('launchFlag');
			if(value){
				setTimeout(()=>{
					uni.redirectTo({
						url: '/pages/users/sign-in/sign-in'
					});
				},1500)
			}else{
				// #ifdef APP-PLUS
				setTimeout(()=>{
					uni.navigateTo({
						url: '/pages/index/privacy_policy'
					});
				},1500)
				// #endif
				
				// #ifndef APP-PLUS
				setTimeout(()=>{
					uni.redirectTo({
						url: '/pages/users/sign-in/sign-in'
					});
				},1500)
				// #endif
			}
		},
		methods: {
			/* 清理缓存 */
			// removeStorage(){
			// 	uni.removeStorage({
			// 		key: config.Global.cache + '_Token',
			// 	});
			// 	uni.removeStorage({
			// 		key: config.Global.cache + '_UserProvider',
			// 	});
			// 	uni.removeStorage({
			// 		key: config.Global.cache + '_ApplyMenu',
			// 	});
			// 	uni.removeStorage({
			// 		key: config.Global.cache + '_appsoftware_key'
			// 	});
			// 	uni.removeStorage({
			// 		key: config.Global.cache + '_FlowEngineList'
			// 	});
			// 	uni.removeStorage({
			// 		key: config.Global.cache + '_DictionaryList'
			// 	});
			// 	uni.removeStorage({
			// 		key: config.Global.cache + '_OrganizeList'
			// 	});
			// 	uni.removeStorage({
			// 		key: config.Global.cache + '_RoleList'
			// 	});
			// 	uni.removeStorage({
			// 		key: config.Global.cache + '_PositionList'
			// 	});
			// 	uni.removeStorage({
			// 		key: config.Global.cache + '_UserList'
			// 	});
			// 	uni.removeStorage({
			// 		key: 'featuresId'
			// 	});
			// 	uni.removeStorage({
			// 		key: 'title'
			// 	});
			// 	uni.removeStorageSync("userList");
			// 	uni.removeStorageSync("depList");
			// 	uni.removeStorageSync("comList");
			// 	uni.removeStorageSync("dicList");
			// 	uni.removeStorageSync("posList");
			// 	uni.removeStorageSync("F_Status");
			// 	uni.removeStorageSync(config.Global.cache + '_Badge');
			// }
		}
	}
</script>

<style>
	/* .status_bar {
	    height: var(--status-bar-height);  
	    width: 100%;  
	    background-color: #FFFFFF;  
	}  
	.top_view {  
	    height: var(--status-bar-height);  
	    width: 100%;  
	    position: fixed;  
	    background-color: #FFFFFF;  
	    top: 0;  
	    z-index: 999;  
	} */
	page{
		width: 100%;
		height: 100vh;
	}
	
	
	
	.mescroll-downwarp .downwarp-progress {
		width: 36px;
		height: 36px;
		border: none;
		margin: auto;
		background-size: contain;
		animation: progressRotate 0.6s steps(6, start) infinite;
	}
	
	
	
	.startup_box{
		justify-content: flex-start;
	}
	.bottomRight{
		position: fixed;
		width: 100%;
		bottom: 0;
		right: 0;
		
		
	}
	.bottomRight_img{
		justify-content: flex-end;
	}
	
	.loading-wrap{
		justify-content: space-between;
	}
	.center-box{
		justify-content: center;
		margin-top: 400rpx;
		padding-bottom: 50rpx;
	}
	
	.loading-main{
		align-items: center;
		justify-content: center;
	}
	.sign-logo{
		width: 164rpx;
		height: 164rpx;
	}
</style>
